
///
/// demo_opt_information.dart
///

class Point {
  num x, y;
  static num factor = 20;
  // 语法糖，等同于在函数体内：this.x = x;this.y = y;
  Point(this.x, this.y);
  void printInfo() => print('($x, $y)');
  static void printZValue() => print('$factor');
}

void main() {
  var p = Point(100, 200);
  p.printInfo();
  Point.printZValue();
  Point.factor = 10;
  Point.printZValue();
}

